<%@ Page Language="C#" MasterPageFile="~/SFMaster.master" AutoEventWireup="true" CodeFile="News.aspx.cs" Inherits="Admin_News"  ValidateRequest="false" %>
<%@ Register Assembly="WebControls" Namespace="WebControls" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderMain" runat="Server">
<table width=100%><tr><td>
    <cc1:SFGrid ID="sfgNews" runat="server" OnNeedsDataSource="sfgNews_NeedsDataSource"
        AutoGenerateColumns="False" IsMasterPageControl="False" IsProtectedForLanguageChange="False"
        OnRowCommand="sfgNews_RowCommand">
        <Columns>
            <asp:TemplateField>
                <itemtemplate>
                <asp:ImageButton id="ibtEdit" runat="server" CommandName="EditData" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"NewsId") %>' ImageUrl="~/images/edit.gif"></asp:ImageButton>
            </itemtemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <itemtemplate>
                <asp:ImageButton id="ibtDelete" runat="server" CommandName="DeleteData" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"NewsId") %>' ImageUrl="~/images/delete.gif"></asp:ImageButton>
            </itemtemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="InsertDate" DataFormatString="{0:d}" HtmlEncode="false"></asp:BoundField>
            <asp:BoundField DataField="NewsDescription"></asp:BoundField>
        </Columns>
    </cc1:SFGrid>
    <cc1:SFButton ID="btnNew" runat="server" OnClick="btnNew_Click" /></td></tr></table>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderEdit" Runat="Server">
    <table>
        <tr>
            <td>
                <cc1:SFLabel ID="lblNewsDescription" runat="server"></cc1:SFLabel>
            </td>
            <td>
                <cc1:SFTextBox ID="txtNewsDescription" runat="server" ControlsLabel="lblNewsDescription"></cc1:SFTextBox>
            </td>
        </tr>
        <tr>
            <td>
                <cc1:SFLabel ID="lblInsertDate" runat="server"></cc1:SFLabel>
            </td>
            <td>
                <cc1:SFCalendar ID="calInsertDate" runat="server" ControlsLabel="lblInsertDate"></cc1:SFCalendar> 
               
            </td>
        </tr>
       
        <tr>
            <td colspan="2">
                <cc1:SFDataList ID="lstNews" runat="server" DataKeyField="NewsContentId" OnNeedsDataSource="lstNews_NeedsDataSource" OnItemDataBound="lstNews_ItemDataBound">
                    <ItemTemplate>
                        <table>
                            <tr>
                                <td valign="top">
                                    <cc1:SFCheckBox AutoPostBack=true OnCheckedChanged="Check" ID=chkLanguage runat=server Text='<%#DataBinder.Eval(Container.DataItem,"LanguageName") %>' />
                                    
                                </td></tr><tr>
                                <td valign="top">
                                <asp:Panel id=pnlNewsContents runat=server>
                                     <table>
                                        <tr>
                                            <td valign=top>
                                                <cc1:SFLabel ID="lblNewsTitle" runat="server"></cc1:SFLabel>
                                            </td>
                                            <td>
                                                <cc1:SFTextBox ID="txtNewsTitle" ControlsLabel="lblNewsTitle" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"NewsTitle") %>'></cc1:SFTextBox>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td valign=top>
                                                <cc1:SFLabel ID="lblNewsSummary" runat="server"></cc1:SFLabel>
                                            </td>
                                            <td>
                                                
                                            </td>
                                        </tr>
                                        <tr>
                                           
                                            <td colspan=2>
                                                <cc1:SFEditor ID="ediNewsSummary" ControlsLabel="lblNewsSummary" EditorHeight="130px" Width="450px" runat="server" HTML='<%#DataBinder.Eval(Container.DataItem,"NewsSummary") %>'></cc1:SFEditor>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td valign=top>
                                                <cc1:SFLabel ID="lblNewsBody" runat="server"></cc1:SFLabel>
                                            </td>
                                            <td>
                                                
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan=2>
                                                <cc1:SFEditor ID="ediNewsBody" ControlsLabel="lblNewsBody" Width="450px" runat="server" HTML='<%#DataBinder.Eval(Container.DataItem,"NewsBody") %>'></cc1:SFEditor>
                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                               
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                    <SeparatorTemplate>
                    <hr />
                    </SeparatorTemplate>
                </cc1:SFDataList>
            </td>
        </tr>
    </table>

</asp:Content>

